<?php

  //Vista News
  
  $view_news = views_get_view('get_data_news');
  $view_news->set_display('page');
  $view_news->set_arguments(array($node->language));
  $view_news->is_cacheable = FALSE;
  $view_news->execute();
  $menu_left = '';
  if($view_news->result){
  	$menu_left = $view_news->render();
  }
  $anno = '';
  $mese = '';
  $js = '';
  $arguments = array($node->language);
  if(isset($_GET['anno'])){
  	$anno = $_GET['anno'];
  	$js .= 'var anno = "'.$anno.'";';
  }
  if(isset($_GET['mese'])){
  	$mese = $_GET['mese'];
  	$js .= 'var mese = "'.$mese.'";';
  }
  //Vista News
  if(!empty($anno)){
  	$arguments = array($node->language,$anno.$mese);
  }
  $view_news = views_get_view('news');
  $view_news->set_display('page');
  $view_news->set_arguments($arguments);
  $view_news->is_cacheable = FALSE;
  $view_news->execute();
  $tot_news = '';
  if($view_news->result){
  	$tot_news = $view_news->render();
  }
  drupal_add_js($js,array('type' => 'inline'));
  
  ?>
  
<!-- CORPO CENTRALE -->
<div class="corpo_centrale">
	<!-- LEFT -->
	<div class="left">
		<?php print $menu_left; ?>	
	</div>
	<!-- /LEFT -->
	
	<!-- RIGHT -->
	<div class="right">
		<div class="contenuto">
			<div class="paragrafo">
				<div class="titolo">
					<div class="icona">
						<img src="<?php print base_path().path_to_theme(); ?>/images/news_azzurro.png" />
					</div>
					<div class="testo">
						<p>NEWS</p>
					</div>
				</div>
				<div class="clear"></div>
				<!-- LISTA DELLE NEWS -->
				<div class="contenitore_lista_news">
					<?php print $tot_news; ?>
				</div>
				<!-- /LISTA DELLE NEWS -->
			</div>	
			<div class="clear"></div>
		</div>
	</div>
	<!-- /RIGHT -->
</div>
<!-- /CORPO CENTRALE -->